package org.zhou.demo1;

import org.zhou.demo1.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Client2 {
    public static void main(String[] args) {

        List<LogModel> logModels = new ArrayList<>(Arrays.asList(
                new LogModel("001", "zhouweixin", "2020-08-02 18:46:20", "这是DB的第一个测试日志"),
                new LogModel("002", "zhouweixin", "2020-08-02 18:50:20", "这是DB的第二个测试日志")));

        LogDbOperateImpl logDbOperate = new LogDbOperateImpl(null, null);

        // 写日志
        logModels.forEach(logDbOperate::createLog);

        // 读日志
        List<LogModel> logs = logDbOperate.getAllLog();
        System.out.println(logs);
    }
}
